/**
 * Witontek.com.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package test.date;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;

/**
 * 
 * @author Long
 * @version $Id: GetMonthDays.java, v 0.1 2017年4月16日 下午4:11:25  xiaolong.ma  Exp $
 */
public class GetMonthDays {

    /**
     * 
     * @param args
     */
    public static void main(String[] args) {
        Calendar cal = new GregorianCalendar();
        /**设置date**/
        SimpleDateFormat oSdf = new SimpleDateFormat("", Locale.ENGLISH);
        oSdf.applyPattern("yyyyMM");
        try {
            cal.setTime(oSdf.parse("201402"));
            int num2 = cal.getActualMaximum(Calendar.DAY_OF_MONTH);

            System.out.println(num2);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
